package com.chaopei.duotai;

/**
 * @Author Corday 天涯
 * @Date 2022/3/7 11:05
 */
public class User extends  Cool {
    private  String add;
    public User(){}

    public User(String username, String password, String add) {
        super(username, password);
        this.add = add;
    }

    //子类重写父类的方法,其访问控制权限要比父类相同或大
    @Override
   public String speak() {
        return "Cool:"+super.speak();
    }

    public String getAdd() {
        return add;
    }

    public void setAdd(String add) {
        this.add = add;
    }
}
